﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhao.Common.AliyunUtil.Model;
using Zhao.Common.EnumEntity;

namespace Zhao.Common.AliyunUtil.Interface
{
    /// <summary>
    /// 阿里云OSS操作接口
    /// </summary>
    public interface IOssClient
    {
        /// <summary>
        /// 文件上传
        /// </summary>
        /// <param name="ObjectKey">上传至相对路径(包括存储文件名)</param>
        /// <param name="FilePath">本地文件路径</param>
        string Upload(OssFileType ossFileType, string FileName, string FilePath);


        /// <summary>
        /// 文件上传（用流的方式）
        /// </summary>
        /// <param name="ObjectKey">上传至相对路径(包括存储文件名)</param>
        /// <param name="inputStream">存储流对象</param>
        string Upload(OssFileType ossFileType, string FileName, Stream inputStream);
        /// <summary>
        /// 文件上传（用流的方式）
        /// </summary>
        /// <param name="FileName">上传至相对路径(包括存储文件名)</param>
        /// <param name="inputStream">存储流对象</param>
        string Upload(string FileName, Stream inputStream);

        /// <summary>
        /// 删除文件
        /// </summary>
        /// <param name="ObjectKey"></param>
        Aliyun.OSS.DeleteObjectResult Delete(string ObjectKey, bool delete = false);


        /// <summary>
        /// 下载文件（流）
        /// </summary>
        /// <param name="Url"></param>
        /// <returns></returns>
        AliyunOssObjModel Download(string Url);
    }
}
